from flask_script import Manager
from info import create_app,db
from info import models
# 工厂设计模式 ，在发生变化时，可以让代码的修改量降到最低
app=create_app('develop')
# app=create_app('product')
manager = Manager(app)

from flask_migrate import Migrate,MigrateCommand
Migrate(app,db)
manager.add_command('db',MigrateCommand)

if __name__ == '__main__':
    print(app.url_map)
    manager.run()